<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>Javascript tree with autoescape</title>
    <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
    <link rel="stylesheet" href="../extra/css/gridless.css">
    <link rel="stylesheet" href="../extra/prism/prism.css">
    <link rel="stylesheet" href="example.css">
    <link rel="stylesheet" href="../jqtree.css">
    <!--[if lt IE 9]>
        <script src="../extra/js/jquery-1.10.2.min.js"></script>
    <![endif]-->
    <!--[if gte IE 9]><!-->
        <script src="../extra/js/jquery-2.0.3.min.js"></script>
    <!--<![endif]-->
    <script src="../extra/prism/prism.js"></script>
    <script src="../extra/js/jquery.mockjax.js"></script>
    <script src="../extra/example_data.js"></script>
    <script src="../tree.jquery.js"></script>
    <script type="text/javascript">
        var _gaq = _gaq || [];
        _gaq.push(['_setAccount', 'UA-33742133-1']);
        _gaq.push(['_trackPageview']);

        (function() {
            var ga = document.createElement('script');
            ga.type = 'text/javascript';
            ga.async = true;
            ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
            var s = document.getElementsByTagName('script')[0];
            s.parentNode.insertBefore(ga, s);
        })();
    </script>
</head>
<body>
    <p id="nav">
        <a href="load_on_demand.html">&laquo; Example 5</a>
        
            <a href="autoscroll.html" class="next">Example 7 &raquo;</a>
        
    </p>

    <h1>Example 6 - autoEscape</h1>

    
    <p>
        You can put html in the node titles setting the <a href="../index.html#tree-options-autoescape">autoEscape</a> option to <strong>false</strong>.
    </p>

    <div id="tree1"></div>

    <h3>html</h3>

<pre><code class="language-markup">
&lt;div id="tree1"&gt;&lt;/div&gt;
</code></pre>

    <h3>javascript</h3>

<pre><code class="language-javascript">
var data = [
  {
    label: 'examples',
      children: [
        { label: '&lt;a href="example1.html">Example 1&lt;/a&gt;' },
        { label: '&lt;a href="example2.html">Example 2&lt;/a&gt;' },
        '&lt;a href="example3.html">Example 3&lt;/a&gt;'
      ]
  }
];

// set autoEscape to false
$('#tree1').tree({
  data: data,
  autoEscape: false,
  autoOpen: true
});
</code></pre>

    <script>
        $(function() {
            var data = [
                {
                    label: 'examples',
                    children: [
                        { label: '<a href="example1.html">Example 1</a>' },
                        { label: '<a href="example2.html">Example 2</a>' },
                        '<a href="example3.html">Example 3</a>'
                    ]
                }
            ];

            // set autoEscape to false
            $('#tree1').tree({
                data: data,
                autoEscape: false,
                autoOpen: true
            });
        });
    </script>

</body>
</html>